/*
 * @Author: xiaosihan 
 * @Date: 2024-06-25 02:46:45 
 * @Last Modified by: xiaosihan
 * @Last Modified time: 2024-07-14 19:01:11
 */


import { autorun } from "mobx";
import { ReactNode, useEffect, useRef, useState } from "react";
import styles from "./wxLogin.module.less";
import qrcodePNG from "./qrcode.png";
import loginStore from "../loginStore";
import phoneIconPNG from "./phoneIcon.png";

interface Iprops {
    children?: ReactNode
}

// 微信登录
export default function WXLogin() {

    useEffect(() => {

    }, []);

    useEffect(() => autorun(() => {

    }), []);

    return (
        <div className={styles.wxLogin} >
            <img className={styles.qrImg} src={qrcodePNG} alt="" />
            {/* <iframe
                className={styles.qrImg}
                src={`https://www.uniqtee.com/wx_qrcode.html?state=${location.host}#/wxqrcode`}
                // src={`//${location.host}/scan_code_success.html`}
                sandbox="allow-same-origin allow-scripts"
            >
            </iframe> */}
            <div
                className={styles.sms_login}
                onClick={() => loginStore.setLoginType("sms_login")}
            >
                <img
                    alt=""
                    src={phoneIconPNG}
                    className={styles.icon}
                />
                短信验证登录
            </div>
        </div>
    );

}